package com.aspose.cells;

final class zaj {
   long a(long var1, byte[] var3, int var4, int var5) {
      if (var3 == null) {
         return 1L;
      } else {
         long var6 = var1 & 65535L;

         long var8;
         for(var8 = var1 >> 16 & 65535L; var5 > 0; var8 %= 65521L) {
            int var10 = var5 < 5552 ? var5 : 5552;

            for(var5 -= var10; var10 >= 16; var10 -= 16) {
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
               var6 += (long)(var3[var4++] & 255);
               var8 += var6;
            }

            if (var10 != 0) {
               do {
                  var6 += (long)(var3[var4++] & 255);
                  var8 += var6;
                  --var10;
               } while(var10 != 0);
            }

            var6 %= 65521L;
         }

         return var8 << 16 | var6;
      }
   }
}
